home *** CD-ROM | disk | FTP | other *** search
/ Gamers Delight 2 / Gamers Delight 2.iso / Aminet / game / misc / TownMaze.lha / TownMaze / README < prev    next >
Text File  |  1991-08-05  |  4KB  |  90 lines

  1. Townmaze v1.1 -- A Program to Design "Bard's Tale I"-Style City Mazes
  2.  
  3. Copyright 1991 by Kent Paul Dolan, Mountain View, CA, USA 94039-0755
  4.  
  5. This program was written in response to a request in USENet newsgroup
  6. rec.games.programmer for "code that designs a town-shaped maze like the
  7. town Bard's Tale I uses"; you be the judge how well it does; I'm quite
  8. proud of the result. The goal is not a great "pencil and paper" maze,
  9. but instead a fun town for a 3D dungeon crawl game to incorporate.
  10. Here's a tiny (7/64 the size of the BT-I town) example output, big ones
  11. look better:
  12.  
  13. ht 15 wd 33 gates 8 left 1 courts 4 unused 2 straight 950 seed 113181
  14. #################################
  15. ### | | # | | # | | # | # # # ###
  16. ##### ##### ##### ##### #-#-#-###
  17. # |   | # | | #   | # #       # #
  18. ###-# ##### ### #####-# ###   #-#
  19. # # # | # |     | # |   | #     #
  20. #-### ####### #-####### ###-###-#
  21. |     | ### | # ### # | # # # # #
  22. #-### ####### #####-### #-###-###
  23. # # #   # #     # |           | #
  24. ###-#   #-#     ###       ### ###
  25. # |                       | # | #
  26. ###-### #-#-#-#-#-#-#-#-# ###-###
  27. ### # | # # # # # # # # # | # ###
  28. #################################
  29.  
  30. There are now _lots_ of command line parameters; you can choose the maze
  31. height in characters, the maze width in characters, number of edge
  32. "gate" street starting positions in the start of the maze design, the
  33. number of these gates that survive in the finished maze, the number of
  34. inner "courtyard" street starting positions in the start of the maze
  35. design, the number of unused cells in the interior to provide more
  36. complex branching in the building nets, how hard the program tries to
  37. make the streets run straight, and you may override the clock seed of
  38. the random number generator with a forced seed, to get a repeat of an
  39. especially nice maze that flashed by while you weren't saving the
  40. output.
  41.  
  42. Things to try: no gates, no courtyards, lots of gates, lots of
  43. courtyards, straightnesses of 0, 250, 500, 750, 950, 980, 996, a few
  44. unused cells to make four way branch points.
  45.  
  46. You can make as big a maze as your machine has memory to hold; the maze
  47. elements are dynamically allocated from free memory, and freed before
  48. the program exits. The mazes get pretty spectacular several pages long,
  49. and need to be at least a full screen to see much of the "town" effect
  50. at all.
  51.  
  52. That much stuff made the command line pretty busy, so things like
  53. debugging are still controlled by #defines in the townmaze.h file.
  54.  
  55. For reasons having to do with Lattice C use, one of the two places I
  56. wrote this, the makefile is that thing called "townmaze.lmk"; at least
  57. on my BSD 4.3 Unix system, "make -f townmaze.lmk" works.  You may need
  58. to edit the makefile a little to work on your system.
  59.  
  60. For compiling on the Amiga, make the indicated edits.  Due to the short
  61. command line allowed by AmigaOS, the blink command must run using the
  62. auxiliary command input file townmaze.with.
  63.  
  64. One big gotcha for porting to various systems is the name of the good
  65. random number generator; if you work on a system that uses the drand48
  66. family instead of random() and srandom(), you'll want your compiles to
  67. have RAND48 defined; see the townmaze.lmk file for an example of how
  68. that works under Lattice C. 
  69.  
  70. When you have the program built, "townmaze help" will get you a usage
  71. display.  You may also want to read the townuser.doc and townpgmr.doc
  72. files for more information about the program for users and programmers
  73. respectively.
  74.  
  75. File CHANGES documents the running changes from release to release, and
  76. file townmaze.test will do a complete test of the user interface code;
  77. when you see how big script townmaze.test is, you'll know why providing
  78. a script was a friendly gesture.
  79.  
  80. Any non-commercial use of this code is permitted, in whole or in part;
  81. credit to the author is requested but not demanded. Commercial use may
  82. be arranged with the author for little or no fee. The primary reason for
  83. the copyright is to keep some yokel from patenting the algorithms
  84. contained herein and spoiling programming for the rest of us.
  85.  
  86. This program is for fun; you use it at your own risk, of course.
  87.  
  88. Kent, the man from xanth.
  89. <xanthian@Zorch.SF-Bay.ORG> <xanthian@well.sf.ca.us>
  90.